Jump to content
Lethal Raptor Games

Loosing quality through DrawImage?

Recommended Posts

Hello. I've taken a close look at my 2D images when they are drawn with DrawImage() and there is a notable quality loss. Not sure if this is a bug in the conversion process or not or if it's my textures... So I've attached the images to see what you all think. One is the original image rendered in Blender. And the other two are screen shots in game; one with the filter mode set to pixel and the other to smooth. Thanks smile.png

Data.zip

Share this post


Link to post

I put together a quick little app to test it and get the same results. Here's the code;

--This function will be called once when the program starts
tex=nil
function App:Start()

--Initialize Steamworks (optional)
Steamworks:Initialize()

--Set the application title
self.title="MyGame"

--Create a window
self.window=Window:Create(self.title)
self.window:HideMouse()

--Create the graphics context
self.context=Context:Create(self.window,0)
if self.context==nil then return false end

--Create a world
self.world=World:Create()

--Load a map
local mapfile = System:GetProperty("map","Maps/start.map")
if Map:Load(mapfile)==false then return false end
tex=Texture:Load("Origanal.tex")

return true
end
--This is our main program loop and will be called continuously until the program ends
function App:Loop()

--If window has been closed, end the program
if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end

--Update the app timing
Time:Update()

--Update the world
self.world:Update()

--Render the world
self.world:Render()

--Render statistics
self.context:SetBlendMode(Blend.Alpha)
if DEBUG then
 self.context:SetColor(1,0,0,1)
 self.context:DrawText("Debug Mode",2,2)
 self.context:SetColor(1,1,1,1)
 self.context:DrawStats(2,22)
 self.context:SetBlendMode(Blend.Solid)
else
 --Toggle statistics on and off
 if (self.window:KeyHit(Key.F11)) then self.showstats = not self.showstats end
 if self.showstats then
  self.context:SetColor(1,1,1,1)
  self.context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2)
 end
end
self.context:DrawImage(tex,200,200)

--Refresh the screen
self.context:Sync(false)

--Returning true tells the main program to keep looping
return true
end

Share this post


Link to post

In the editor the image displays okay. It's just when using DrawImage () does it look bad. It also produces a line one pixle high, right at the bottom of the rendered image... im pretty sure that line belongs at the top.

Share this post


Link to post

I was actually using Leadwerks 3.0. In 3.1 I get the same results as you do:

 

post-7919-0-41580100-1397447446_thumb.png

 

You should post a bug report.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...