Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jun 2009
Offline Last Active Oct 30 2015 07:00 PM

#5203135 GLSL simple shader help

Posted by on 09 January 2015 - 12:42 PM

Thats nice still doesnt make it useful does it?

#5203126 GLSL simple shader help

Posted by on 09 January 2015 - 12:02 PM

Do not bring up old issues that I posted without enough thought its rude. I would gladly delete if there were an option but I cannot find it

#5201852 GLSL simple shader help

Posted by on 04 January 2015 - 09:49 PM

Can someone help me make lines pointing out from the center like this shader as a fragment shader


I would like to make them spin but getting them would be a great step


I am trying to think of a way to do this but I have just started and need some help I would think I can get the angle from the center for each fragment if its a certain angle make it a color how can I determine the angle from the center?

#5171773 OpenGL ES on desktops

Posted by on 05 August 2014 - 08:18 PM

Thanks looks like a good post ill read up

#5155109 c++ class vs struct+functions

Posted by on 21 May 2014 - 01:08 PM

@L. Spiro Your absolutely right data tables looks like a much better option! Ill have to read up and start messing around that will probably save alot of work and be simpler Thanks


@Pink Horror Im not sure it will get done lol im familiar with how member functions work just not how they get compiled as far as overhead especially for something complicated where it might be harder to optimize down. If I dont try how am I going to learn? For most work I do I do in php that doesnt help make me become a better programmer for the most part lol.

#5040260 How feasible is using the NDK?

Posted by on 06 March 2013 - 11:13 PM

I wish you luck but sharing a bit of my experience its not pretty but I do hope it keeps getting better.



1. Ease of conversion only real issue was pthread_cancel in my case

2. Excellent performance must faster than java in some heavy cpu encryption cases



1. With much research I still cannot get a gl context without java

2. Targeting multiple devices is a pain I must be doing something wrong but that leads to 3. Out of the 4 devices in my home apparently there are 3 different types of arm cores which makes sense being some are old and 1 is a media player but I still havent been able to get all of them to work.

3. Horrible docs alot of things are not documented

4. pthread_cancel is non existent and probably more but thats just something my project was using that it cant anymore.


I hope this is just me and not the ndk itself this has just been my experience and I have never compiled for arm devices before maybe someone knowing more can put tell if the cons are just me or not I would be interested to know.


One note about my findings so far I have not done audio so thats a bit scary as the library we were using is not capable and were looking for low level audio im not sure how well it will come out.

#4982438 c++ string pointer to char*

Posted by on 21 September 2012 - 11:24 AM

@cornstalks Im not too concerned anymore knowing its not at least in my current system but I would almost rather it break than start swapping out and become horribly slow. Im just worried on cross compiling for arm devices since im sure they put far less time into the implementations than x86 but ill cross that path if it ever arises.

@yewbie lol pretty much I dont have to worry about null terminations and keeping the size for binary data, not that its difficult just why do it when strings are cleaner and easier well there is this scenario when I would have more control but I dont believe I need it now that we covered everything.

#4982046 c++ string pointer to char*

Posted by on 20 September 2012 - 08:44 AM

Thanks Cornstalks thats good news now I would assume its c++11 not sure about the cross compiler though but ill give it the benefit of the doubt for now.

@SiCrane Thats what I was thinking but I get the warning warning: cast to pointer from integer of different size and a seg fault when running

Thanks everyone its much clearer in my head now everything is working with the c_str()

#4982040 c++ string pointer to char*

Posted by on 20 September 2012 - 08:34 AM

Thanks yewbie
It was me that was doing the extra memory allocation I falsely blammed c_str() but that page brings up a question it says maybe it allocates memory maybe not. Im handling big data on little resources so maybe makes a copy is a bit of an alarm is there a way to do my original idea of &data[0] but for strings that way I can make sure it gets a direct pointer?

Im not worried about writing back to it it will remain a const so no worry there. Im just trying to guarantee 2 100MB strings and program and os overhead can run safely on a 512MB device.

#4982036 c++ string pointer to char*

Posted by on 20 September 2012 - 08:22 AM

@yewbie Im not quite sure what your doing there and it seems like your still make duplicates of the string

@hodgman It works width the ->c_str() but im trying to avoid making an extra copy of the data thats why I was trying to point directly to the data

Now that im looking at everything im not sure c_str() is causing the extra data I think it might of been me so I guess going up a step does c_str() allocate any memory or is it a pointer to the data?

#4982025 c++ string pointer to char*

Posted by on 20 September 2012 - 08:04 AM

I am trying to avoid making an unnecessary copy of my data as I believe string->c_str() would do
so im trying to point directly to the string data like &string[0]
but my problem is I have a string pointer like this

void somefunction( std::string* data ){
     someotherfunction( data->c_str() ); //needs char*

how can I do the equivalent of &data[0] with the pointer?

#4963720 OpenGl slower and slower!

Posted by on 27 July 2012 - 12:14 PM

Post the code the wild guesses are not helping but ill try some anyways
1. Are you using the old fixed pipeline approach (it could be phasing out driver wise because opengl is/did drop it)
2. VC6? common with all the hotpatches and crap over the years I wouldnt be surprised if just mentioning it leaked some memory
3. What kind of machine are you on? vc6, noticeable 6mb difference in memory, cant use the gdebugger?
4. How are you timing the frames in code and screen
5. Could just be your drawing code is off causing it to look slower and slower (get the fps)

#4941592 BSP to Octree

Posted by on 20 May 2012 - 12:43 AM

How is that a stupid question more like that was a stupid answer. I have content already in bsp format I also dont know of an editor for octrees so thats what I am trying to figure out. I know that octrees and bsps are very different in the way data is stored and theres probably not a easy way to convert between them but there has to be something that can do it I dont care if it has to process for a week.