Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


vsg1990

Member Since 13 Sep 2012
Offline Last Active Aug 29 2013 03:00 PM

Topics I've Started

ShaderResourceView w/ D3D11_TEX2D_SRV

04 October 2012 - 01:58 PM

Hi,

I'm currently trying to make my own version of Tetris using Direct3D 11 (First game Posted Image ). I have no problem putting 1 texture on the screen at a time, but I am creating a ID3D11ShaderResourceView per texture. I don't think that is very efficient. I saw that a ID3D11ShaderResourceView can have an array of 2D textures loaded into it.

Can I draw 1 texture at a time from the ID3D11ShaderResourceView?
If so, how can I specify which texture I want to draw from the ID3D11ShaderResourceView?

Sorry If I'm misunderstanding what it's supposed to be used for. Still new to graphics programming.

Thanks,
Vince

Tic-Tac-Toe

17 September 2012 - 10:27 PM

Hi,

I've been reading these forums for a while. This is my first post. I've been learning DirectX for a while and understand enough code to fill a window with a quad and color it. However, its getting very complicated very fast and I feel like I don't know enough about 'organizing' code to write a game with DirectX. So I decided to write a game with C++ in the console. Someone suggested Tic-Tac-Toe, so I decided to give it a whirl. I would like as many opinions as I can get about optimizing/organizing this code. You can be very critical, it won't hurt my feelings. Posted Image

http://pastebin.com/c2puhfFy - main.cpp
http://pastebin.com/bxQP7sB2 - main.h
http://pastebin.com/2bn6LxaL - board.cpp
http://pastebin.com/mbsKZhYE - board.h

Thanks,
Vince

PARTNERS