Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Goombert

Week ago Robert actually reverted the surface changes
What surface changes? A week ago I tried to add a multisampler surface.

General ENIGMA / Re: Model Index Buffers
« on: August 03, 2013, 09:11:24 AM »
It was me in the last VBO commit. The reason why I added that is because we at least need to rename them to d3d_add_vertex() and d3d_add_index() and so on. The color compatibility change (discussed in the other topic) just break this as it is. When you do d3d_model_vertex() then it automatically fills color buffer with the bound color and so if you do d3d_model_color() afterwards, then it just break the whole thing.
Yes, we are going to have to remove all those functions I added except the index one, go look at how I had to write the D3D9 model class and you'll see why.
This is why we need to just implement Studio's new vertex format and vertex functions for special model formats that can accommodate animation, multitexturing, and be passed to shaders.

They are already used in the sprite drawing now.
Yes but I meant a function for the end user of ENIGMA to add indexing to their d3d models.

Well apparently the comment worked. I didn't think of it being a big deal so I didn't make a topic. Basically it was a "TODO: THIS DON'T WORK" kind of comment.
It's cool, I just would have preferred you to make a topic about something like that for us all to discuss, because it did need discussed anyway.

This is how it's done in GL3shapes now. We could maybe give that plane2D_rotated(gs_scalar* data) function to enigma_user. But I get why functions like that could be useful.
I don't think you get what I mean, I am also wanting to add a surface_get_data() function which returns a pointer to an array of color data for surfaces. This avoids things like passing shit one at a time, eg. surface_getpixel()

I would also appreciate if I could get you to merge my pull request Harri...

Proposals / Re: GL3 changes from immediate to retained mode
« on: August 03, 2013, 07:39:41 AM »
Well see now we are going to have to implement those FVF functions from Studio and wrap the old ones like Josh said. Because, I was writing the models into DX and got them working, but I had to make each vertex take color and alpha and shit even when not passed. At least it would allow us to do multitexturing, and then we could deprecate those immediate mode style functions I added. While we're at it, we also need to deprecated quads as a primitive type for models.

Proposals / Re: GL3 changes from immediate to retained mode
« on: August 03, 2013, 12:57:38 AM »
Harri, another thing about this is that DX has FVF or Flexible Vertex Format.

General ENIGMA / Model Index Buffers
« on: August 03, 2013, 12:39:50 AM »
//Are these functions really needed? They just break stuff!

Whoever left me that gold fucking nugget in the source code, here is my response: Yes

Game Maker traditionally does not provide functions for passing indices to the index buffer, making it pretty awful for optimized models. If you don't know how an index buffer works, then Google it. I would prefer that topics be posted here under "General ENIGMA" for discussion by all developers, lets try to avoid comments like this in the source code from now on guys, ok? Please proceed to discuss a change in the function specification if you like, I am open to other idea's.

I am also wanting us to add a...
Code: [Select]
void d3d_model_push_colordata(gs_scalar* data);
void d3d_model_push_texturedata(gs_scalar* data);
and also maybe like this...
Code: [Select]
void d3d_model_push_colordata(int dslist);
So that a pointer to an array can be passed by the end programmer to push an entire array or data structure list of color data into the model, avoiding for loops and shit.

General ENIGMA / Frustum Culling and View Hashing
« on: August 03, 2013, 12:33:39 AM »

Well this is obviously an easy way we can get games speeded up. I am talking of course of adding a quadtree for culling 2D objects outside the view. I don't intend or am I even suggesting to implement this for the draw_sprite commands or anything, just simply for objects who are set a sprite and do not have a draw event and by default simply draw their sprite.

The reason is because sometimes people implement their own view bounds checking, for instance, cheeseboy does in his Raptor Blasters game. Also programmers may have their own methods of making their game faster that our method might impede. Therefore I am only suggesting this for objects that do not have draw events.

The idea is simple, we divide all the objects update into a quadtree based on their local x and y and mask, then simply draw only the ones in view by default.

Off-Topic / Re: Marshmellos Do you like them white, brown, or black?
« on: August 02, 2013, 10:55:28 PM »
Meh, I'm more of a smores or dip your Oreo's in milk kind of guy :P

General ENIGMA / Re: Half Pixel Alignment, OpenGL and DirectX
« on: August 02, 2013, 08:12:31 PM »
Actually, just to update on this, this problem is specific to D3D 9. It looks awful Josh, we have to do something about it, the solution does work for OpenGL 1, but D3D 9 is notorious for this problem.

General ENIGMA / Direct3D 10 and Windows Software Development Kit
« on: August 02, 2013, 07:20:01 PM »
Well after investigating why I had problems with adding a Direct3D 10 graphics system, I have figured out why. MinGW ships the D3D 9 headers and libraries but only one of the D3D10 headers and two of its libs libd3d10 and libd3dx10, the d3dx10.h header is needed for transformations and vector classes. So this means regardless of installation we need to add the requirement for users that want D3D10 or later to install the Windows SDK, which now directly includes the DirectX SDK, they are no longer separate. This is a huge SDK, and in turn requires .net Framework 4, meaning we also need to add a dependency for that if people want the D3D10 or later graphics. I think this is why YYG's are still using D3D9. Thoughts guys?

Edit: Studio also requires you to install .net 4 and .net 3.5 for Windows 8

So should we just focus on .net framework 4, and be a step ahead of them?

General ENIGMA / Re: Delusions of Grandeur
« on: August 02, 2013, 04:26:49 PM »

General ENIGMA / Re: Delusions of Grandeur
« on: August 02, 2013, 01:31:12 AM »
Everything looks fine to me :P Josh, please lay down the crack pipe, stop smoking pcp, and seek professional help.

General ENIGMA / Half Pixel Alignment, OpenGL and DirectX
« on: August 01, 2013, 02:27:16 AM »
As some of you may not be aware, vector graphics require a half pixel align or else there are edge artifacts, anybody who has worked with SVG's knows about this. Anyway, DX and OGL require you do the half pixel alignment yourself for 2D rendering. Now Josh's original proposal to me was to just shift the ortho projection function by (-0.5,-0.5) and that appeared to work because I was using draw_rectangle. Now this does not fix it for every draw function, as x and y are by default float because of gs_scalar and what both graphics API's use internally. This means if you call say draw_sprite(random(room_width), random(room_height)); you'll end up with half the sprites half pixel aligned and the other half of them not. The only way I could resolve it locally was to cast to integer before passing the coordinates to the draw functions and then letting the projection matrix shift (-0.5, -0.5)

The only solution to this I can think of is to either explicitly require integer for x and y with 2D drawing functions (which breaks them for transforming say a sprite into a 3D billboard as float is still the highest precision allowed). We could create a separate scalar for 2D x and y drawing functions so people can easily choose their cast. Or we can manually enter (-0.5, -0.5) to every single 2D drawing function. Looking for input on this you guys, specifically you, Josh Dreamyland.

Proposals / Re: GL3 changes from immediate to retained mode
« on: August 01, 2013, 02:21:56 AM »
Only vertex shaders could help there.
Exactly, it is OpenGL 3, the goal was to rewrite all of it to use shaders. In fact, just Google, I found all the basic immediate mode functions recreated into shaders yesterday somewhere, lost the link :/, but it was open source.

General ENIGMA / DirectX Models and Primitives
« on: August 01, 2013, 02:19:21 AM »
Yes, I already spoke on this a bit before, but Direct3D offers an internal mesh class that can do optimization and has interfaces for dynamic level of detail (LOD), and can also by default load (*.x) model files, which models can be exported from Blender in.

From what I can gather however, the mesh class works with triangle lists internally, however you can get a pointer and control locking and unlocking of its index and vertex buffer, however I was looking at the specification for DrawSubet()
D3DX Meshes use indexed triangle lists, and are therefore drawn with IDirect3DDevice9::DrawIndexedPrimitive.

So I am unsure if we can use this to create models that can have other primitive types. It is however possible for us to make it so that people only thing they are using the other primitive types and just hack them all into triangle lists, after all that is the fastest way to do it, that is *the* primitive of the GPU. Quads all that shit are on there way out and are already software processed in OpenGL 3 and later.

Also, when the base mesh interface loads a (*.x) model file it also gives you the file name from its material telling you where its texture is located. The base mesh interface holds transformation, texture, and material information, so we would also need to add a d3d_model_get_texture() function to avoid having inaccessible textures in memory. Just looking for some input guys... I want to say just go ahead and use it but idk, I would have to hack in and fake other primitive types, which albeit would be really fast anyway, but idk if you guys are ok with me doing that or what or if we should just write our own mesh interface like I did with OpenGL 3.

Proposals / Re: GL3 changes from immediate to retained mode
« on: July 31, 2013, 08:31:27 PM »
Well I would also like to mention that contrary to Josh's belief the D3D9 sprite batcher can also render tiled sprites by simply setting the source rectangle larger than the bounds and enabling texture repetition render state...

The only thing I don't know about is, whether I should force texture repetition on and leave it on in the sampler when these functions get called or implement a perplexed system for checking whether its enabled and then disable it again.