Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olof Hedman

Member Since 24 Aug 2011
Online Last Active Today, 02:55 AM

Posts I've Made

In Topic: How to load a texture to OpenGL in Swift?

Yesterday, 07:35 AM

Try remove the & from this line:


 glTexImage2D(GL_TEXTURE_2D0GL_RGBAwidthheight0GL_RGBAGL_UNSIGNED_BYTE, &pixelData);


Currently, you are sending in the adress of the argument to your function, not the value of it

In Topic: Stopping a negative viral campaign against you?

28 October 2014 - 07:56 AM

Seems you need a pretty thick skin to be an "official person" on the Internet... Lots of people react before they think, and with anonymity and the ease of communication, you are bound to receive some pretty infiltered thoughts. Most people are also pretty bad at expressing their thoughts in text. 


I don't think you should confuse all angry comments with "trolls".  Originally the word "troll" (on the internet) meant someone that disagreed with you "just because", and with the sole purpose of pissing you off, only for their own enjoyment, with no real interest in the topic at hand. (I'm sure most people have met this kind of person in real life too).

Today it seems to shift towards meaning "anyone that does not agree with me", which I think is a very unproductive way to look at it.


 It might be hard to see the difference sometimes, but trying to calmly engage in discussion usually filters out the people with legitimate claims from the trolls pretty quickly.

In Topic: texture2D lookup bias?

28 October 2014 - 07:08 AM

Trilinear means you always sample from two mipmap levels, and weight them together, regardless of bias.

Internally it will calculate "how much" between the mipmap levels the current fragment is, and weight them together by this value.

bias simply adds to that value.


If you are not using trilinear, I would assume the mipmap level will be clamped/rounded to a whole number after the bias have been added.

(so if it internally thinks you are at mipmaplevel 1.42, and you have bias 0.6, the resulting mipmap level will be 2)

In Topic: Mac or PC - Really, this is a programming question.

27 October 2014 - 10:02 AM

At work:

Mostly Macbook + XCode, Eclipse if I have to (android/GAE) and the occasional Windows/Linux in a VM

Also a pinch of cmake, make and ant (much prefer to build android from command line, much less error prone)


motivation: sweet hardware and even though I often do multi platform stuff, heavy focus on iOS and OSX. 


At home:

Windows Desktop + Various linux devices + arduino + Old Macbook as lab laptop

Mostly using cmake, make and arduino IDE, but I mostly do embedded programming at home atm.


motivation: Windows Desktop is to play games more then dev... Old macbook is very nice as a lab platform because it is a posix system and plays a lot nicer with linux and other *nix:es

In Topic: Reading PNG format (deflate compression)

21 October 2014 - 02:26 AM

why are you writing decoders?


As a personal exercise he says.


Though even though implementing "everything" yourself might be fun, I think the writers of the PNG spec assume one would simply use zlib to do the compression/decompression  when implementing a png image encoder/decoder.